package com.foreknow.demo6;

public class MethodDemo4 {

    public static void sort(int[] arr) {
        //int[] arr = {1,2,3,4,5};
        for (int i = 0;i<arr.length;i++) {
            System.out.println(arr[i]);
        }
    }

    public static int[] sort1() {
        int[] array = {1,2,3};
        return array;
    }


    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6,7,8,9};
        MethodDemo4.sort(arr);

        System.out.println("---------------------------------------------------");

        int[] array = MethodDemo4.sort1();
        for(int i = 0;i<array.length;i++) {
            System.out.println(array[i]);
        }
    }
}
